home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Libris Britannia 4
/
science library(b).zip
/
science library(b)
/
TECHNICA
/
AUTOCAD
/
H108.ZIP
/
JUL91.ZIP
/
TIP612X.LSP
< prev
next >
Wrap
Lisp/Scheme
|
1991-08-27
|
2KB
|
52 lines
;TIP612X.LSP No-Conflict Text (c)1991, Jim Regier
(defun C:SHADOW2 (/ SET TXT CLAY NUM ITEM
EN ED E1 PT1 PT2 PT3 PT4 OFFSET ANG1
ANG2 LEN LEN1)
(setvar "CMDECHO" 0)
(princ "\nPick Text to Shadow")
(setq TXT (ssget)
NUM (sslength TXT)
ITEM 0
)
(command "ELEV" "0.01" "")
(while (< ITEM NUM)
(setq EN (ssname TXT ITEM))
(setq ED (entget EN))
(if (= (cdr (assoc 0 ED)) "TEXT")
(progn
(setq OFFSET (/(cdr(assoc 40 ED))
5.0))
;distance from box to text based
;on text height / 5
(setq E1 ED) ;save original
(setq ED (subst (cons 72 2)
(assoc 72 ED) ED))
(entmod ED)
(setq ED (entget EN))
(setq PT1 (cdr (assoc 10 ED)))
(setq PT2 (cdr (assoc 11 ED)))
(setq LEN (distance PT1 PT2))
(setq ED E1)
(entmod ED)
(setq PT1 (cdr (assoc 10 ED)))
(setq ANG1 (cdr (assoc 50 ED)))
(setq ANG2 (+ ANG1 (/ pi 2)))
(setq PT1 (polar PT1 (+ ANG1 pi)
OFFSET))
(setq PT1 (polar PT1 (+ ANG2 pi)
OFFSET))
(setq PT2 (polar PT1 ANG1
(+ LEN (* 2 OFFSET))))
(setq LEN1 (+ (cdr (assoc
40 ED)) (* 2 OFFSET)))
(setq PT3 (polar PT2 ANG2 LEN1))
(setq PT4 (polar PT1 ANG2 LEN1))
(command "3DFACE" PT1 PT2 PT3
PT4 "")
) ;end progn
) ;end if
(setq ITEM (1+ ITEM))
)(princ) ;end while
)